#pragma once

#include <mutex>
#include <thread>
#include <condition_variable>

class EventLoop;
class LoopThread
{
private:
    std::mutex _mutex;
    std::condition_variable _cond; // 条件变量??
    EventLoop *_loop;
    std::thread _thread;

private:
    //1. 实例化EVentLoop对象，开始运行
    void ThreadEntry();

public:
    LoopThread();

    // 1. 获取当前线程的EVentLoop对象
    EventLoop *GetLoop();
};